(function () {
  let myChart = echarts.init(document.querySelector(".box-l3"));
  let option = {
    legend: {
      top: "bottom",
    },
    series: [
      {
        name: "Nightingale Chart",
        type: "pie",
        radius: [40, 100],
        center: ["50%", "50%"],
        roseType: "area",
        itemStyle: {
          borderRadius: 8,
        },
        data: [
          { value: 22, name: "图例 1" },
          { value: 23, name: "图例 2" },
          { value: 20, name: "图例 3" },
          { value: 15, name: "图例 4" },
          { value: 20, name: "图例 5" },
        ],
      },
    ],
  };
  // 步骤5：使用刚指定的配置项和数据显示图表
  myChart.setOption(option);

  window.addEventListener("resize", () => {
    myChart.resize();
  });
})();
